package aml.parse.node;

import aml.parse.ParseNode;
import aml.parse.Token;

public class Op extends ParseNode {	// Op as an intermediate layer
	private String str;
	
	public Op(Token t) {
		this.str = t.toString();
	}
	
	public String toString() {
		return str;
	}
	
	public OpNode makeNode() {
		if (str.equals(",")) return new OpComma();
		if (str.equals("=")) return new OpAssign();
		if (str.equals("+")) return new OpPlus();
		if (str.equals("*")) return new OpMultiply();
		return null;
	}
}